"use strict"


import Constant from "../libs/constants";
import Ajax from "../libs/ajax";
import TimeUtils from "@/libs/time"
export default {

    getTodayTraffic() {
        let date = TimeUtils.getStr(new Date(), 'yyyyMMdd')
        return Ajax.ajax({
            url: `${Constant.URL_GET_TRAFFIC}?date_from=${date}000000&date_to=${date}235959`,
            method: 'get',
            timeout: 100 * 1000,
        }).then(res => res.data)
    },
    getTraffic(date_from, date_to) {
        return Ajax.ajax({
            url: `${Constant.URL_GET_TRAFFIC}?date_from=${date_from}&date_to=${date_to}`,
            method: 'get',
            timeout: 100 * 1000,
        }).then(res => res.data)
    }
}